package com.lap.test;

import java.util.Objects;

public class Singleton {

	private static volatile Singleton singleton;

	private Singleton() {
	}

	public static Singleton instance() {
		if (Objects.isNull(singleton)) {
			synchronized (Singleton.class) {
				if (Objects.isNull(singleton)) {
					singleton = new Singleton();
				}
			}
		}
		return singleton;
	}

}
